/*
 * @Author: your name
 * @Date: 2020-04-15 11:04:31
 * @LastEditTime: 2020-04-15 11:04:41
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \v1.0.0\pages\addressBook\interface.js
 */

import {
    http,
    navigate
} from '@/common/framework'
import config from '@/common/config';



/************************api*******************************/

/**
 *获取组织机构树，包括人员
 *
 * @export
 * @param {*} params
 * @returns
 */
export function queryAddressBook(params) {
    return http.post(config.webApiUrl + '/kmlc/sys/sysDepart/queryAppUserAndDepartTree', params)
}

/**
 *获取用户信息
 *
 * @export
 * @param {*} params
 * @param String  params.id //用户id 
 * @returns
 */
export function queryUserInfo(params) {
    
    return http.get(config.webApiUrl + '/kmlc/sys/user/queryAppUserInfoById', params)
}





/************************pageFunc*******************************/


export const pageFunc = {
    
    /**
     *打开用户详情页面
    *
    * @export
    * @param {*} params
    * @param String  params.id  //用户id
    */
    openUserInfo: (params) => {
        let url = `/pages/addressBook/detail/detail?id=${params.id}`;
        navigate.gotoPage(url);
    }
}